package com.myexample.computerintenet;

import com.myexample.computerintenet.util.MyInfo;

import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.Socket;

public class MyClient {
    public static void main(String[] args) {
        try {
            new MyClient();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    public MyClient() throws IOException {
        Socket socket=new Socket(MyInfo.IP_ADDRESS,MyInfo.PORT);
        OutputStream outputStream=socket.getOutputStream();
        PrintWriter out=new PrintWriter(new OutputStreamWriter(outputStream));
        out.println("你好，这里是客户端");
        out.close();
        socket.close();
    }
}
